<template>
  <div class="web-page-module">
    <div class="web-page-module-title">
      <img v-lazy="pageJson.iconUrl" :alt="pageJson.title" />
      {{ pageJson.title }}
    </div>
    <div class="web-page-module-content">
      <link-icon :links="pageJson.iconlinks" />
      <link-card :links="pageJson.cardLink" />
    </div>
  </div>
</template>

<script lang="ts" setup>
import LinkCard from '@/components/web-page-box/LinkCard.vue'
import LinkIcon from '@/components/web-page-box/LinkIcon.vue'
import { defineProps } from 'vue'
defineProps({
  pageJson: {
    type: Object,
    default: () => {
      return {}
    }
  }
})
</script>
<style lang="scss" scoped>
.web-page-module {
  position: relative;
  margin: auto;
  margin-bottom: 15px;
  width: 890px;
  min-height: 10px;
  height: auto;
  padding: 20px 15px;
  background-color: white;
  font-size: 14px;
  box-shadow: 0px 0px 20px #ccc;

  .web-page-module-title {
    line-height: 30px;
    text-align: left;
    font-weight: 600;

    img {
      vertical-align: text-bottom;
      width: 20px;
      margin-right: 5px;
    }
  }

  .web-page-module-content {
    margin-top: 10px;
  }
}

@media screen and (max-width: 480px) {
  .web-page-module {
    width: calc(100% - 50px);
  }
}
</style>
